$(function() {
	initPie();
});

function initPie(){
	var JSONData = document.getElementById("stationDetailForm:pieDate");
	if(null != JSONData) {
		var pieData = JSONData.value;
		var pie = echarts.init(document.getElementById("stationPie"));
		var option = {
				tooltip: {
					trigger: 'item',
				},
				grid:{
					top:20,
					left:10
				},
				series: [
					{
						name:'完成情况',
						type:'pie',
						selectedMode: 'single',
						radius: [0, '80%'],
						minAngle:0.1,
//			        	 data:[{"name":"已完成","itemStyle":{"normal":{"color":"green"}},"value":0},{"name":"未完成","itemStyle":{"normal":{"color":"red"}},"value":2},{"name":"进行中","itemStyle":{"normal":{"color":"yellow"}},"value":0}]
						data:JSON.parse(pieData)
					}
					]
		};
		pie.setOption(option);
	}
}
